    // 例1
    var obj = {};
    obj.name = '小王';
    var MyName = 'name';
    console.log(obj.name); //小王
    console.log(obj["name"]); //小王
    console.log(obj['name']); 
    console.log(obj.MyName); //undefined
    console.log(obj[MyName]); //小王
    var MyName = 'name2';
    console.log(obj[MyName]); //undefined
    // 例2
    var person = {
      name: '哆啦'
    };
    console.log(person.name); //哆啦
    console.log(person["name"]); //哆啦